package test05;

public class Four2 {
    public static void main(String[] args){
        int score=(int)(1+Math.random()*(5-1+1));
        String str="";
        switch (score)
        {
            case 1:
                str="不及格";
                break;
            case 2:
                str="及格";
                break;
            case 3:
                str="中等";
                break;
            case 4:
                str="良好";
                break;
            case 5:
                str="优秀";
                break;

        }
        System.out.println("switch方法计算下的结果：成绩为："+str);
    }
}
